﻿using FastExecutor.Base.Design;
using FastExecutor.ORG.Entity;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Mvc;

namespace FastExecutor.ORG.Controller
{
    [RouteArea("Frame")]
    [RoutePrefix("LoginLog")]
    public class LoginLogController : FastTemplateController<Frame_LoginLog>
    {
        [Route("List")]
        public ActionResult List()
        {
            return View("~/Views/Frame/Log/LoginLog_List.cshtml");
        }

        [HttpPost, Route("FindList")]
        public override ActionResult FindList()
        {
            JObject Params = GetParams();
            string LoginName = Convert.ToString(Params["LoginName"]);
            if (!string.IsNullOrEmpty(LoginName))
            {
                ListWhereText += string.Format(" and LoginName like '%{0}%'", LoginName);
            }
            OrderText = "LoginDate desc";
            return base.FindList();
        }
    }
}
